package com.woniuxy.pxxt.controller;


import com.woniuxy.pxxt.common.result.Result;
import com.woniuxy.pxxt.service.DepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 部门表(PxxtDepartment)表控制层
 *
 * @author makejava
 * @since 2022-03-07 16:33:15
 */
@Api(value = "对部门的操作")
@RestController
@RequestMapping("/department")
@CrossOrigin
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @ApiOperation(value = "查询出所有部门经理")
    @GetMapping("/findAllManager")
    public Result findAllManager(){
        return departmentService.findAllManager();
    }

    @ApiOperation(value = "查询出所有部门")
    @GetMapping("/findAllDepartment")
    public Result findAllDepartment(){
        return departmentService.findAllDepartment();
    }

}

